package com.leve.control.constant;

/**
 * @author wanghy
 * @Description: API接口返回结果状态码
 */
public enum ErrorCode {


    //成功，统一用调用这里，不能再代码中写死0
    SUCCESS(0, "成功"),
    E_11111(1, "查询结果为空"),
    //系统级别错误
    E_10001(10001, "系统出现异常"),
    E_10002(10002, "没有访问接口权限"),
    E_10003(10003, "未找到资源"),
    E_10004(10004, "登录过期"),
    E_10005(10005, "Redis出现异常，连接不上"),
    E_10007(10006, "没有登录，请登录" ),

    //具体接口服务级别错误
    E_20011(20011, "验证码验证失败" ),
    E_20013(20013, "授权成功!" ),
    E_20007(20007, "用户名不存在" ),
    E_20008(20008, "密码不正确" ),
    E_20009(20009, "用户名已存在" ),
    E_20010(20010, "账号被禁用" ),
    E_20015(20015, "请先上传户型图!" ),
    E_20016(20016, "密码不能为空" ),
    E_20017(20017, "没有权限!" ),
    E_20018(20018, "审核中,请等待.." ),
    E_20019(20019, "申请成功!" ),
    E_20023(20023, "设置失败!" ),
    E_20025(20025, "修改失败!" ),
    E_20028(20028, "无法获取到经纬度信息!" ),
    E_20029(20029, "操作失败" ),




    //调用的接口出现错误
    E_30001(30001, "调用微信服务接口出错" ),
    E_30002(30002, "调用第三方短信接口出错" );




    /** 编码 */
    private int code;

    /** 信息 */
    private String msg;

    private ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
